def 选择排序(arr):
    for i in range(len(arr)):
        min_indx=i
        for j in range(i+1,len(arr)):
            if arr[j]<arr[min_indx]:
                min_indx=j
            arr[i],arr[min_indx]=arr[min_indx],arr[i]
    print(arr)
选择排序([9,8,7,6,5,4,3,2,1])